<?php
namespace soa\mp\cloudPrint\v1;

use soa\client;

class courierBind  extends client
{
	/**
	 * 服务地址
	 * @var string
	 */
	public $service_url = 'http://mp.kuaidihelp.com/';
	/**
	 * 服务名称
	 * @var string
	 */
	protected $service_name = 'kuaidihelp_mp';

	public function bind($uid, $platform, $courier_id){
		return $this->post("api/cloudPrint/cloudPrint/v1/courierBind/bind", compact('uid', 'platform', 'courier_id'));
	}

	public function agentBind($agent_guid, $courier_id){
		return $this->post("api/cloudPrint/cloudPrint/v1/courierBind/agentBind", compact('agent_guid', 'courier_id'));
	}

	public function unbind($uid,$platform){
		return $this->post("api/cloudPrint/cloudPrint/v1/courierBind/unbind", compact('uid', 'platform'));
	}

	public function agentUnbind($agent_guid){
		return $this->post("api/cloudPrint/cloudPrint/v1/courierBind/agentUnbind", compact('agent_guid'));
	}

	public function getByUser($uid, $platform){
		return $this->post("api/cloudPrint/cloudPrint/v1/courierBind/getByUser", compact('uid', 'platform'));
	}

	public function getByAgent($agent_guid){
		return $this->post("api/cloudPrint/cloudPrint/v1/courierBind/getByAgent", compact('agent_guid'));
	}

	public function getCourierIdByUser($uid, $platform){
		return $this->post("api/cloudPrint/cloudPrint/v1/courierBind/getCourierIdByUser", compact('uid', 'platform'));
	}

	public function getCourierIdByAgent($agent_guid){
		return $this->post("api/cloudPrint/cloudPrint/v1/courierBind/getCourierIdByAgent", compact('agent_guid'));
	}
}